Skip to content

Add API Reference to docs navigation#127

Open
beran-t wants to merge 38 commits intomainfrom
add-api-ref-to-nav
Open

Add API Reference to docs navigation#127
beran-t wants to merge 38 commits intomainfrom
add-api-ref-to-nav

Conversation

@beran-t
Copy link
Contributor

@beran-t beran-t commented Feb 23, 2026

Summary

  • Add OpenAPI-based API Reference anchor to docs.json navigation, using openapi-public.yml as the spec source
  • Include the openapi-public.yml spec file
  • Hide deprecated badges in sidebar via custom CSS to prevent endpoint name truncation
  • Add generation script (scripts/generate_openapi_reference.py)
  • Add validation script (scripts/validate_api_reference.py)
  • Add workflow for creating pr if docs change

beran-t added 25 commits March 3, 2026 15:30
Generation script fixes (fix_spec_issues):
- Generate operationId for all 52 platform endpoints
- Remove phantom /v2/sandboxes/{sandboxID}/logs deprecation reference
- Complete truncated 'start'/'end' parameter descriptions on metrics
- Fix sandboxId → sandboxID casing in 502 error schema
- Add security: [] and 'health' tag to GET /health
- Remove YAML anchor overlay on /files responses (DownloadSuccess/UploadSuccess)
- Add type: object to 53 schemas missing it
- Move 'end' param description out of schema to sibling level

Also fix fill_empty_responses to skip $ref responses.

Upstream issues not fixable in spec:
- allow_internet_access snake_case (server field name)
- Duplicate EntryInfo schemas (different APIs)
- Inconsistent error response coverage (API behavior)
- Auth inconsistency across template versions (intentional v1→v2/v3)
Schema fixes:
- EntryInfo.type: add 'directory' to enum (was file-only)
- SandboxMetadata, EnvVars: add type: object (had only additionalProperties)
- TemplateLegacy: add missing 'names' and 'buildStatus' fields
- connect-protocol-version: remove redundant enum (const suffices)
- filesystem.EntryInfo.size: document int/string union type (int64)

Response fixes:
- PATCH /templates/{templateID}: return TemplateUpdateResponse (was empty)
- POST /sandboxes/{sandboxID}/refreshes: add missing 500 response
- GET /health 502: content-type → application/json (was connect+json)

Also fix fill_empty_responses to skip $ref responses.
- Rewrite operationId generator with proper singularization
  (sandboxes→sandbox, not sandboxe)
- Use 'list' prefix for collection GETs (listSandboxes, listTemplates)
- Include version suffix for v2/v3 variants (postTemplatesV3)
- Singularize parent resource when followed by path param
  (GET /sandboxes/{id}/logs → getSandboxLogs)
- Dedup check ensures all 52 platform operationIds are unique
…points, add status mismatch catch-all

- Change DELETE /templates/{templateID} cleanup expected status from 200 to 204
- Remove POST /init test (internal endpoint, not in public spec)
- Remove unauthenticated 401 tests to avoid load balancer rate limiting
- Use account-owned template alias instead of hardcoded 'base' for alias test
- Send no-op Update to process instead of PTY resize (avoids 500 on non-PTY process)
- Add post-processing catch-all that flags any tested endpoint with unexpected status code
…hase 3, update workflow

- Remove 3 endpoints that tested API key against Bearer-only endpoints (just confirmed 401)
- Move GET /templates/aliases/{alias} test to phase 3, use the test template we create there
- Update workflow to generate spec, diff, run validation, and create PR with status indicator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant